﻿<%@ Page Language="C#" MasterPageFile="~/Users/Users.Master" AutoEventWireup="true" CodeBehind="ViewListPremises.aspx.cs" Inherits="Pantry.Web.Users.ViewListPremises" Title="Untitled Page" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="Resources/js/DataTables/jquery.dataTables.min.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="g_12_tienvn">
                <div class="widget_contents noPadding">
                    <table class="tables">
                        <thead>
                            <tr>
                                <th>
                                    Premise Name
                                </th>
                                <th>
                                    Address
                                </th>
                                <th>
                                    Phone Number
                                </th>
                                <th>
                                    Project Code
                                </th>
                                <th>
                                    
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:Repeater ID="RepeaterListPremises" runat="server" OnItemCommand="RepeaterListPremises_ItemCommand">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <asp:HiddenField ID="HiddenFieldPremiseId" runat="server" Value='<%#Eval("PremiseId") %>' />
                                            <%#Eval("PremiseName")%>
                                        </td>
                                        <td>
                                            <%#Eval("Address")%>
                                        </td>
                                        <td>
                                            <%#Eval("PhoneNumber")%>
                                        </td>
                                        <td>
                                            <%#Eval("ProjectCode")%>
                                        </td>
                                        <td>
                                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="update" OnClientClick="return confirm('Are you sure to remove this Premise ?')" ><span style="color:Green">Remove</span></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </tbody>
                    </table>
                    <div class="dtBottom">
                        <div class="dtInfo">
                            <%--<div class="dataTables_info" id="DataTables_Table_0_info">
                                Showing 1 to 10 of 10 entries</div>--%>
                        </div>
                        <div class="dtPagination">
                            <%--<CC1:COLLECTIONPAGER id="CollectionPager" runat="server" 
                                HideOnSinglePage="false" BackText="Back" FirstText="First" ShowLabel="False" 
                                ShowFirstLast="False" NextText="Next" ResultsLocation="None" 
                                PageNumbersSeparator=" " PagingMode="PostBack">
                            </CC1:COLLECTIONPAGER>--%>
                            <a class="lookupPremise" href="#">Associate new Premise</a>
                        </div>
                    </div>
                </div>
            </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    <div class="dialog DialogListOfPremise" style="display:none;" title="List Premise">
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="ButtonSelect" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="ButtonClose" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="RepeaterListPremises" EventName="ItemCommand" />
    </Triggers>
        <ContentTemplate>
        <div class="widget_contents noPadding ">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
                <div class="dtTables">
                    <table class="tables">
                    <thead>
                        <tr>
                            <th>  
                            </th>
                            <th>
                                Premise Name
                            </th>
                            <th>
                                Address
                            </th>
                            <th>
                                Phone Number
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="RepeaterActivePremiseNotBelongService" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <th>
                                        <input type="radio" name="radioPremiseId" value='<%#Eval("PremiseId") %>' />
                                    </th>
                                    <td>
                                        <%#Eval("PremiseName")%>
                                    </td>
                                    <td>
                                        <%#Eval("Address")%>
                                    </td>
                                    <td>
                                        <%#Eval("PhoneNumber")%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
                </div>
                <div class="dtBottom">
                    <div class="dtInfo">
                        <div class="dtPagination">
                            <div class="dtInfo-1">
                                <label class="simple_form">Project Code : </label><asp:TextBox ID="TextBoxProjectCode" runat="server" CssClass="simple_form"></asp:TextBox>
                                <asp:Button ID="ButtonSelect" runat="server" Text="Select" CssClass="button" OnClick="ButtonSelectClick"/>
                                &nbsp;
                                <asp:Button ID="ButtonClose" runat="server" Text="Close" CssClass="button" OnClientClick="ClosePremisePopup();" />
                            </div>
                        </div>
                    </div>
                    <div class="dtPagination">
                        <cc1:CollectionPager ID="CollectionPager" runat="server" BackText="Back" FirstText="First"
                            ShowLabel="False" ShowFirstLast="False" NextText="Next" ResultsLocation="None" PagingMode="PostBack"
                            PageNumbersSeparator="">
                        </cc1:CollectionPager>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </div>
    <a href="#" class="showmessage hasheader"></a>
    
</asp:Content>
